<template>
  <transition name="slide-fade">
    <div class="fileList" :class='{"h":!showHead}' v-show="show">
      <p class="title">
        文件序列
        <span class="close" @click="openList()"></span>
      </p>
      <div class="fileLists">
        <ul>
          <li
            :title="file.name"
            :class='{"fin":file.status==1,"cur":currentIndex == index,"error":file.isBad }'
            v-for="(file,index) in showList"
            :id="index"
            @click="selectFile(index)"
          >{{index+1}}. {{file.name}}</li>
        </ul>
      </div>
    </div>
  </transition>
</template>
<script>
export default {
    name:"Slide",
    data(){
        return{

        }
    },
    props:['show','fileType','files','currentIndex','showList','showHead'],
    created: function () {
    },
    methods: {
        selectFile: function (index) {
            this.$emit("selectFile",index)
        },
        openList: function () {
            this.$emit("openList")
        }
    }
}
</script>